import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/shujia',  
    component: () => import('../views/oneluyou/shujia.vue')
  },
  {
    path: '/fenlei',
    component: () => import('../views/oneluyou/fenlei.vue'),
    children:[
      {
        path: 'twobangdan',
        component: () => import('../views/twoluyou/twobangdan.vue')
      },
      {
        path: 'twofenlei',
        component: () => import('../views/twoluyou/twofenlei.vue')
      },
      {
        path: 'twozhuti',
        component: () => import('../views/twoluyou/twozhuti.vue')
      },
      {
        path:"",
        redirect:"twofenlei"
      }
    ]
  },
  {
    path: '/shucheng',
    component: () => import('../views/oneluyou/shucheng.vue'),
   
  },
  {
    path: '/tuiguang',
    component: () => import('../views/oneluyou/tuiguang.vue')
  },
  {
    path: '/wode',
    component: () => import('../views/oneluyou/wode.vue')
  },
  {
    path: '/sousuo',
    component: () => import('@/components/yemian/sousuo.vue')
  },
  {
    path: '/wanjie',
    component: () => import('@/components/wanjie.vue')
  },
  {
    path: '/xinshu',
    component: () => import('@/components/yemian/xinshu.vue')
  },
  {
    path: '/denglu',
    component: () => import('@/components/yemian/denglu.vue')
  },
  {
    path: '/zhuce',
    component: () => import('@/components/yemian/zhuce.vue')
  },
  {
    path: '/xiangqing',
    component: () => import('@/components/yemian/xiangqing.vue')
  },
  {
    path: '/kongbai',
    component: () => import('@/components/yemian/kongbai.vue')
  },
  {
    path: '/konngbai/:xiaoming',
    component: () => import('@/components/yemian/konngbai.vue')
  },
  {
    path: '/zong',
    component: () => import('@/components/yemian/zong.vue')
  },
  {
    path: '/',
    redirect:"/shujia"
  },
  {
    path: '*',
    name: 'no',
    component:  () => import('@/components/yemian/404.vue')
  }
]

const router = new VueRouter({
  // mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
